import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { SimpleListComponent } from './list/list.component';
import { SimpleCodegenComponent } from './codegen/codegen.component';
import { SimpleGeneralcListComponent } from './dynamic/list/general.list.component';
import { SimpleListEditComponent } from './list/edit/edit.component';
import { SimpleSqlComponent } from './sql/list.component';

const routes: Routes = [
  { path: 'list', component: SimpleListComponent },
  { path: 'list/edit', component: SimpleListEditComponent, data: { reuse: true, title: '列表编辑' } },
  { path: 'dynamic/list/:code', component: SimpleGeneralcListComponent },
  { path: 'codegen', component: SimpleCodegenComponent },
  { path: 'sql', component: SimpleSqlComponent },
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule],
})
export class SimpleRoutingModule {}
